A conventional ambient light sensor (ALS) generally comprises at least one photodiode. The decrease in the voltage across the terminals of each photodiode is dependent on the amount of light received by this photodiode.
It is generally possible to deduce an ambient light level by measuring the voltage across the terminals of each photodiode at the end of an integration period before and after which the sensor is reset through recharging of the corresponding photodiode.
However, such a light level detection is generally sensitive to the flicker of artificial light sources that are powered with alternating current (AC) and that illuminate the photodiode.
Such flicker may in particular negatively affect the results of the ambient light level detection, for example through the appearance of moiré patterns on images taken by an image-capturing device coupled to the sensor.
In a case where the artificial light sources are powered by the mains voltage at 50 Hz/60 Hz, one solution for solving this flicker problem consists in choosing an integration period for the photodiode that is a multiple of the half-period of the mains voltage. That is to say a multiple of 10 ms for an AC voltage at 50 Hz or a multiple of 8.33 ms for an AC voltage at 60 Hz. Such a solution is described in French patent document FR 2 997 496 and corresponding U.S. patent publication US20140117214.
In recent years, the widespread use of artificial light sources based in particular on light-emitting diode (LED) technology and on energy-saving lights has led to flicker sources that are based on AC frequencies other than the conventional frequencies, i.e. 50 Hz or 60 Hz.
In addition, a conventional ambient light sensor is generally designed to generate only DC output signals that do not, unfortunately, contain information relating to the random frequency or frequencies of the flicker sources.
Once AC output signals corresponding to the variation of the ambient light level in the proximity of each photodiode of an ambient light sensor have been obtained, as is conventional, it is then necessary to provide a complex signal processing operation of fast Fourier transform (FFT) type to the output signals.
There is thus a need to propose a technical solution with low complexity and a small silicon footprint that makes it possible to generate AC output signals corresponding to the variation of the ambient light level in the proximity of each photodiode of an ambient light sensor.
These AC output signals are intended to be delivered to what is termed a host processor, for example a microcontroller, that is able to calculate flicker frequencies of the light sources on the basis of these AC output signals by using for example a complex signal processing operation of fast Fourier transform (FFT) type.
However, such a complex signal processing operation generally requires a high computing power and a significant computing time, these not being desirable in the context of the overall performance of the sensor and in particular in the context of user experience.
Furthermore, although such a complex signal processing operation may make it possible to obtain a plurality of different flicker frequencies of the light sources, it is only possible to use an average flicker frequency as a basis for choosing an exposure time that is tailored in such a way as to attenuate or even to prevent such a flicker problem at variable frequencies.
In other words, it is not really necessary to obtain all of the different flicker frequencies of the light sources in order to improve the performance of the ambient light sensor.
In this respect, there is therefore a need to propose a low-complexity and inexpensive technical solution that makes it possible, quickly and accurately, to obtain the average flicker frequency of the light sources on the basis of the AC output signals.
More generally, there is a need to propose a technically simple solution for determining the average frequency of an AC signal.